package com.jk.smartelderlycare.controller;

import com.jk.smartelderlycare.dto.SysSign;
import com.jk.smartelderlycare.dto.SysSlider;
import com.jk.smartelderlycare.interfaces.SysSliderServiceApi;
import com.jk.smartelderlycare.pojo.PagedResponse;
import com.jk.smartelderlycare.service.SysSliderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author hhk
 * @version 1.0
 * @ClassName SysSliderController
 * @program: smart-elderly-care
 * @description: TODO
 * @date 2024/11/19 17:28
 */
@Slf4j
@RestController
public class SysSliderController implements SysSliderServiceApi {

    @Autowired
    private SysSliderService sysSliderService;
    /**
     * @description: 后端分页查询
     * @param: [sysSign, pageNum, pageSize]
     * @return: com.jk.smartelderlycare.pojo.PagedResponse<com.jk.smartelderlycare.dto.SysSlider>
     * @author hhk
     * @date: 2024/11/19 17:29
     */
    @Override
    public PagedResponse<SysSlider> findSysSliderPaginationList(SysSlider sysSlider, Integer pageNum, Integer pageSize) {
        return sysSliderService.findSysSliderPaginationList(sysSlider,pageNum,pageSize);
    }
    /**
     * @description: 新增
     * @param: [sysSlider]
     * @return: void
     * @author hhk
     * @date: 2024/11/19 17:29
     */
    @Override
    public void addSlider(SysSlider sysSlider) {
        sysSliderService.addSlider(sysSlider);
    }
    /**
     * @description: 根据id删除一条数据
     * @param: [sliderId]
     * @return: void
     * @author hhk
     * @date: 2024/11/19 17:30
     */
    @Override
    public void deleteSysSliderById(Long sliderId) {
        sysSliderService.deleteSysSliderById(sliderId);
    }
    /**
     * @description: 根据id回显一条数据
     * @param: [sliderId]
     * @return: com.jk.smartelderlycare.dto.SysSlider
     * @author hhk
     * @date: 2024/11/19 17:30
     */
    @Override
    public SysSlider findSysSliderById(Long sliderId) {
        return sysSliderService.findSysSliderById(sliderId);
    }
    /**
     * @description: 修改
     * @param: [sysSlider]
     * @return: void
     * @author hhk
     * @date: 2024/11/19 17:30
     */
    @Override
    public void updateSysSlider(SysSlider sysSlider) {
        sysSliderService.updateSysSlider(sysSlider);
    }
    /**
     * @description: 修改状态
     * @param: [sysSlider]
     * @return: void
     * @author hhk
     * @date: 2024/11/19 17:30
     */
    @Override
    public void updataStutas(SysSlider sysSlider) {
        sysSliderService.updataStutas(sysSlider);
    }
    /**
     * @description: 批量删除
     * @param: [sliderId]
     * @return: void
     * @author hhk
     * @date: 2024/11/19 19:23
     */
    @Override
    public void deleteSysSliderByIds(List<Long> ids) {
        sysSliderService.deleteSysSliderByIds(ids);
    }
}
